package com.lcq.gulimall.third.controller;

import com.lcq.gulimall.third.component.SmsComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SMSController {
    @Autowired
    SmsComponent smsComponent;
    @RequestMapping("/sms/send/auth/code")
    public void sendAuthCode(@RequestParam("phone") String phone, @RequestParam("code") String code){
        smsComponent.sendSms(phone,code);
    }
}
